package com.ce.server.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author 郑爽
 * @since 2021-11-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_clock_in")
@ApiModel(value="ClockIn对象", description="")
public class ClockIn implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "学生学号")
    private String sno;

    @ApiModelProperty(value = "健康打卡地址")
    @TableField("clock_in_address")
    private String clockInAddress;

    @ApiModelProperty(value = "创建时间")
    @TableField("createTime")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:MM:ss")
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "打卡时间")
    @TableField("clock_in_time")
    @JsonFormat(pattern = "yyyy-MM-dd hh:MM:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:MM:ss")
    private LocalDateTime clockInTime;

    @ApiModelProperty(value = "体温")
    private String temperature;

    @ApiModelProperty(value = "14天内接触史")
    @TableField("contact_history")
    private String contactHistory;

    @ApiModelProperty(value = "健康码状态")
    private String jkm_status;

    @ApiModelProperty(value = "学生")
    @TableField(exist = false)
    private Student student;


}
